package net.oktaeder.office.view;

import java.util.ArrayList;
import java.util.List;

/**
 * Stub class used in testing of MailDaemon
 * 
 * @author tuukka
 *
 */
public class StubMailer implements IMailer {

	private boolean mailUpdated;
	private ArrayList<Mail> outgoingMails;
	private ArrayList<Mail> incomingMails;
	
	public StubMailer() {
		mailUpdated = false;
		outgoingMails = new ArrayList<Mail>();
		incomingMails = new ArrayList<Mail>();
	}
	
	public String getInbox() {
		// TODO Auto-generated method stub
		return null;
	}

	public String getOutbox() {
		// TODO Auto-generated method stub
		return null;
	}

	public void setInbox(String inbox) {
		// TODO Auto-generated method stub

	}

	public void setOutbox(String outbox) {
		// TODO Auto-generated method stub

	}

	public ArrayList<Mail> updateMailQueue(ArrayList<Mail> outgoing) {
		mailUpdated = true;
		if (outgoing != null) {
			incomingMails.addAll(outgoing);
		}
		return outgoingMails;
	}
	
	public boolean mailUpdated() {
		return mailUpdated;
	}
	
	public void addMail(Mail mail) {
		outgoingMails.add(mail);
	}
	
	public int getIncomingMailCount() {
		return incomingMails.size();
	}
	
	public List<Mail> getInboxMails() {
		return incomingMails;
	}
	
	public List<Mail> getOutboxMails() {
		return outgoingMails;
	}
}
